﻿namespace Crypton
{
    /// <summary>
    /// Encryption / decryption service service
    /// </summary>
    public interface ICryptonService
    {
        /// <summary>
        /// Generates the crypto key.
        /// </summary>
        /// <param name="algorithmName">Name of the algorithm.</param>
        /// <param name="keyLength">Length of the key.</param>
        /// <param name="key">The key.</param>
        void GenerateCryptoKey(string algorithmName, int keyLength, string key);

        /// <summary>
        /// Encrypts the files.
        /// </summary>
        /// <param name="sourceMask">The source mask.</param>
        /// <param name="key">The key.</param>
        /// <param name="destDir">The dest dir.</param>
        void EncryptFiles(string sourceMask, string key, string destDir);

        /// <summary>
        /// Decrypts the files.
        /// </summary>
        /// <param name="sourceMask">The source mask.</param>
        /// <param name="key">The key.</param>
        /// <param name="destDir">The dest dir.</param>
        void DecryptFiles(string sourceMask, string key, string destDir);

        /// <summary>
        /// Signs the files.
        /// </summary>
        /// <param name="sourceMask">The source mask.</param>
        /// <param name="privateKey">The private key.</param>
        /// <param name="destDir">The dest dir.</param>
        void SignFiles(string sourceMask, string privateKey, string destDir);


        /// <summary>
        /// Validates the sign.
        /// </summary>
        /// <param name="sourceMask">The source mask.</param>
        /// <param name="publicKeysDir">The public keys dir.</param>
        /// <param name="verbose"></param>
        bool VerifySign(string sourceMask, string publicKeysDir, bool verbose);
    }
}
